import request from './../utils/request'
export default {
  // 分页获取列表
  search (page, size, searchMap) {
    return request({
      url: `/staff/list/search/${page}/${size}`,
      method: 'post',
      data: searchMap
    })
  },

  // 新增员工
  add (pojo) {
    return request({
      url: '/staff',
      method: 'post',
      data: pojo
    })
  },

  // 更新
  update (pojo) {
    return request({
      url: `/staff/${pojo.id}`,
      method: 'put',
      data: pojo
    })
  },

  // 查询
  getById (id) {
    return request({
      url: `/staff/${id}`,
      method: 'get'
    })
  },

  // 删除
  deleteById (id) {
    return request({
      url: `/goods/${id}`,
      method: 'delete'
    })
  }
}
